Skip to content

Conversation

@dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented May 1, 2025

Link: llvm/llvm-project#137875
Requested by: @dtcxzyw

@github-actions github-actions bot mentioned this pull request May 1, 2025
@dtcxzyw
Copy link
Owner Author

dtcxzyw commented May 1, 2025

Diff mode

runner: ariselab-64c-v2
baseline: llvm/llvm-project@0fab741
patch: llvm/llvm-project#137875
sha256: a7c84173f82c753fed80b2026c6f47eea947e7c11508e3528c8de791eb6574d0
commit: 29e03bb

279 files changed, 178796 insertions(+), 176206 deletions(-)

Improvements:
  basicaa.SearchLimitReached 34556 -> 34607 +0.15%
  div-rem-pairs.NumPairs 37225 -> 37237 +0.03%
  instcombine.NumDeadInst 35308362 -> 35319579 +0.03%
  correlated-value-propagation.NumNNeg 84494 -> 84519 +0.03%
  correlated-value-propagation.NumNUW 513092 -> 513177 +0.02%
  reassociate.NumChanged 4252383 -> 4253064 +0.02%
  instcombine.NumCombined 105539274 -> 105547222 +0.01%
  simplifycfg.NumFoldBranchToCommonDest 675080 -> 675106 +0.00%
  early-cse.NumCSEGEP 11595237 -> 11595564 +0.00%
  early-cse.NumCSELoad 6545009 -> 6545189 +0.00%
Regressions:
  early-cse.NumCSE 3847121 -> 3840377 -0.18%
  correlated-value-propagation.NumAnd 38152 -> 38142 -0.03%
  gvn.NumGVNPRE 139437 -> 139403 -0.02%
  instcombine.NumFactor 39348 -> 39342 -0.02%
  bdce.NumRemoved 333460 -> 333430 -0.01%
  licm.NumGEPsHoisted 48404 -> 48402 -0.00%
  instcombine.NumDeadStore 24551 -> 24550 -0.00%
  instcombine.NumSunkInst 2880391 -> 2880298 -0.00%
  count-visits.MaxVisited 43155 -> 43154 -0.00%
  simplifycfg.NumFoldValueComparisonIntoPredecessors 479118 -> 479108 -0.00%

21 23 bench/abc/optimized/abc.ll
6 7 bench/abc/optimized/bmcMulti.ll
74 76 bench/abc/optimized/cecSatG2.ll
8 9 bench/abc/optimized/giaCof.ll
36 38 bench/abc/optimized/giaEquiv.ll
8 13 bench/abseil-cpp/optimized/float_conversion.ll
32 44 bench/abseil-cpp/optimized/int128.ll
97 91 bench/cmake/optimized/archive_read_support_format_iso9660.ll
36 30 bench/cmake/optimized/archive_read_support_format_zip.ll
42 54 bench/faiss/optimized/gtest-all.ll
67 51 bench/fmt/optimized/unicode-test.ll
56 40 bench/fmt/optimized/xchar-test.ll
74 86 bench/freetype/optimized/sfnt.ll
23 24 bench/hdf5/optimized/H5Fsuper_cache.ll
50 23 bench/hdf5/optimized/H5Tvlen.ll
59 54 bench/libjpeg-turbo/optimized/rdtarga.ll
37 34 bench/libquic/optimized/p256-64.ll
85 69 bench/lief/optimized/AArch64PAuth.ll
65 49 bench/lief/optimized/BinaryParser.ll
84 68 bench/lief/optimized/LoadConfiguration.ll
84 68 bench/lief/optimized/SignatureParser.ll
75 59 bench/lightgbm/optimized/tree.ll
7 8 bench/llvm/optimized/X86InstrInfo.ll
23 26 bench/llvm/optimized/blake3.ll
3 3 bench/lodepng/optimized/lodepng_util.ll
55 61 bench/meshlab/optimized/gltf_loader.ll
180 176 bench/mold/optimized/arch-m68k.ll
238 234 bench/mold/optimized/arch-sparc64.ll
23 26 bench/mold/optimized/blake3.ll
10 10 bench/node/optimized/libnode.cares_wrap.ll
60 67 bench/openjdk/optimized/hb-ot-name.ll
26 27 bench/openjdk/optimized/utf8.ll
48 51 bench/openssl/optimized/statem_srvr.ll
8 17 bench/openusd/optimized/pointInstancerAdapter.ll
8 17 bench/openusd/optimized/primRange.ll
57 60 bench/php/optimized/pcre2_auto_possess.ll
4 7 bench/php/optimized/pcre2_study.ll
22 29 bench/qemu/optimized/fdt.ll
45 66 bench/qemu/optimized/fdt_sw.ll
128 137 bench/recastnavigation/optimized/imguiRenderGL.ll
1 1 bench/rust-analyzer-rs/optimized/36cskjvhktchzlnh.ll
21 28 bench/spike/optimized/fdt.ll
128 73 bench/spike/optimized/fdt_ro.ll
45 66 bench/spike/optimized/fdt_sw.ll
80 64 bench/vcpkg/optimized/format.ll
17 20 bench/wireshark/optimized/packet-atm.ll
21 24 bench/wireshark/optimized/packet-knet.ll
86 89 bench/wireshark/optimized/packet-opensafety.ll
180 186 bench/wolfssl/optimized/tls.ll
9 11 bench/zed-rs/optimized/38cn6p2m6864jrrxog4mr8xwk.ll
6 8 bench/zed-rs/optimized/7ud3epkhjcjfe38h6hlh4jrau.ll

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2025

Here is a brief summary of the changes in the patch, focusing on up to 5 major and interesting transformations:

  1. Phi Instruction Adjustments
    In several functions (e.g., Abc_CommandAbc9Pms, Gia_ManCountConst0PosGia, read_eocd), PHI nodes have been updated to reference new incoming values—typically replacing uses of %70 with %68. This suggests an optimization pass has modified induction variables or loop counters, possibly due to dead code elimination or simplification of arithmetic expressions.

  2. Simplified Integer Comparisons Using OR Instead of SHL/OR Disjoint Pattern
    A recurring pattern where two integers were combined using (shl x, 1) | y was replaced with a simpler x | y (e.g., in Abc_CommandAbc9Pms, Gia_ManCountConst0PosGia, tt_cmap2_char_index, etc.). This change indicates that the optimizer recognized unnecessary bit manipulation operations and reduced them for better performance or clarity.

  3. Dead Code Removal in Conditional Branches
    Several blocks involving unused or unreachable control flow have been removed (e.g., eliminated branches based on zero comparisons of inserted constants). For example, in tt_cmap2_char_index, redundant checks like %or = icmp eq i32 %inserted_val, 0 followed by branch logic were deleted after value propagation indicated they were unnecessary.

  4. Load/Store Reordering and Pointer Updates
    Multiple instances show updates to load/store instructions—particularly pointer offsets and alignment assumptions. For example, in archive_read_support_format_iso9660.ll, the base pointers used for loads/stores are now derived from earlier definitions (%54 instead of %55). This could be due to improved alias analysis or memory access optimizations.

  5. Loop Simplifications and Phi Renaming
    Loop headers and associated PHIs were cleaned up across several files (p256-64.ll, float_conversion.ll, tree.ll). Some preheaders were restructured, and PHIs were simplified or renamed, indicating canonicalization of loop structures and potential vectorization improvements.

These changes reflect typical LLVM optimizations such as instruction simplification, loop canonicalization, constant propagation, and removal of redundant bit operations—likely resulting from -O3 level passes or equivalent.

model: qwen-plus-latest
CompletionUsage(completion_tokens=501, prompt_tokens=117032, total_tokens=117533, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this May 1, 2025
@dtcxzyw dtcxzyw deleted the test-run14775883526 branch May 18, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant